using UnityEngine;
using System.Collections;

public class Controles : MonoBehaviour 
{
	public string axisName = "Vertical";
	public float speed = 5f;	
	void Update () 
	{
		var delta = new Vector3(0, speed, 0);
		
		if (Input.GetAxis(axisName) >= .001)
			delta *= 1f;
		else if (Input.GetAxis(axisName) <= -.001)
			delta *= -1f;
		else 
			delta = Vector3.zero;
		
		transform.position += delta;
		
			
	}
}
